import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

w = np.array(pd.read_excel("lossdata (1).xlsx"))[:, 1:]
x = np.array(range(1, len(w) + 1))
print(w)
plt.plot(w[1:, 0],label='total_loss')
plt.plot(w[1:, 1],label='val_loss')
plt.xlabel("Epoch")
plt.ylabel("Loss")
plt.legend()
# plt.grid(True)
plt.show()

# import torch
#
# print(torch.__version__)
#
# print(torch.version.cuda)
#
# print(torch.backends.cudnn.version())
# import tensorflow as tf
#
# version = tf.__version__
# gpu_ok = tf.test.is_gpu_available()
# print("tf version:", version, "\nuse GPU", gpu_ok)
